Skip to content

feat(status): recovery cleanup, override modal in Broadcast, suppression clear#7

Merged
ctlaltesc merged 2 commits into
developfrom
claude/add-push-notifications-xeHBy
May 2, 2026
Merged

feat(status): recovery cleanup, override modal in Broadcast, suppression clear#7
ctlaltesc merged 2 commits into
developfrom
claude/add-push-notifications-xeHBy

Conversation

@ctlaltesc

Copy link
Copy Markdown
Owner

Summary

Seven asks rolled into one commit:

1. Recovery notifications were not firing

The flow required state.lastDownAt to be set, which only happens when the service observes the monitor as down during the current process's lifetime. If a user subscribed (e.g. from the home-page banner that's showing because the monitor briefly went down between polls), then the service restarted, then the monitor came back up — the recovery notification never fired because lastDownAt was undefined.

Fix: at subscription time, call service.primeRecovery(monitorId) which seeds lastDownAt = now if the monitor is currently observed non-up. Cold-start safe (no-op when the monitor is already up — there's nothing to recover from).

2. Auto-clear reports on recovery (manual or automatic)

  • Natural recovery: on the first poll where state.upSince flips from unset to set (i.e., the monitor just transitioned from down → up), call clearActiveReportsForMonitor to mark every active ProblemReport row resolved. Independent of the recovery-stable window — if the service is back up, the report badges should clear right away.
  • Manual recovery: when an admin posts /uptimerobot/override with status: 'operational' while the previous effective status was anything other than up, the route now awaits the report-clear (so the 200 response already reflects an empty report list) and then fires the recovery web push fire-and-forget.

3. Hide the per-monitor description when there's a report or override active

On the public Status page, the description line under a monitor is now suppressed if either condition is true:

  • manualStatus is set (the override label speaks for itself)
  • there's at least one active report against the monitor (the report badge speaks for itself)

4. "Report a problem" → "Report a Problem"

Updated the trigger button copy and the modal title (and any other surface that referenced the old casing).

5. "Broadcast Notification" → "Broadcast"

The page header on /users/broadcast is now the simpler "Broadcast" — matches the sidebar entry.

6. Manual status override modal on the Broadcast page

The override modal was extracted into src/components/MonitorOverrideModal/ as a reusable component with two operating modes:

  • Pre-selected monitor (used by /status's pencil icon) — opens with the service already selected.
  • Picker mode (used by Broadcast's new "Override service status" button) — opens with the picker unset; admin chooses inside the modal.

The modal exposes a service <select>, a status <select> (Automatic / Operational / Scheduled Maintenance / Degraded Performance / Partial Outage / Major Outage), a themed minutes input, an Apply primary button and a Clear secondary button.

7. Clear-suppression button on /status

The suppression banner now renders a small admin-only Resume reports button next to it. New DELETE /uptimerobot/suppression endpoint (admin-gated, idempotent) sets reportsSuppressedUntil = undefined and saves.

Verification

Check Result
Server typecheck clean
Client typecheck clean
Prettier --check clean
pnpm i18n:extract clean
Test suite 108 / 108 passing — 4 new (POST /override clears active reports when set to operational; DELETE /uptimerobot/suppression rejects non-admin / clears active window / idempotent on no window)
Theme audit new modal uses form-row + text-label + form-input-area + form-input-field; Resume-reports button uses Button buttonType="warning" matching the suppression banner palette

Test plan

  • Pull the next CI image. Take a monitored service down, log in as a user, click Notify me. Restart the seerr container while the monitor is still down. Bring the service back up. Confirm the user receives the recovery push within recoveryStableMinutes of the up observation.
  • As an admin in /status, override a downed monitor to Operational. Confirm:
    • the row immediately switches to a green/Operational pill;
    • any "X people are reporting" badges disappear in the same response;
    • the monitor description hides (since the override label is now showing instead);
    • subscribers receive the recovery web push.
  • As a user, file a report. Confirm the description for that monitor is hidden while at least one active report exists.
  • Send a broadcast with Suppress problem reports (minutes) = 60. Confirm the Resume reports button appears next to the banner on /status. Click it; confirm the banner + button disappear and POST /uptimerobot/reports succeeds again.
  • On /users/broadcast, confirm the page header reads Broadcast (not "Broadcast Notification").
  • Click Override service status on the broadcast page. Confirm the modal opens with the service picker visible (placeholder Select a service). Pick a service, choose a status, set minutes, click Apply. Confirm the override applies.
  • As any user, click Report a Problem and confirm both the button and the modal title use the capitalized form.

https://claude.ai/code/session_01VNTFg16m3B9W14MnMcRqk8


Generated by Claude Code

…ion clear

- Recovery: prime in-memory state on subscription so users who tap
  Notify still get alerted even if the service never observed the
  monitor as down (process restart, brief blip).
- Recovery + reports: clear active problem reports the moment a monitor
  flips from down to up — natural recovery and admin "Operational"
  override both wipe the reports. Manual recovery also dispatches the
  recovery web push without waiting on the stable window.
- Status page: hide the per-monitor description when there's an active
  user-report or a manual override, since the override label / report
  badge already speaks for itself.
- Status page: admin-only "Resume reports" button next to the
  suppression banner. New DELETE /uptimerobot/suppression endpoint
  clears the window.
- Broadcast: title is now just "Broadcast"; new "Override service
  status" button opens the same modal as /status with a service picker
  inside.
- Modal extracted to MonitorOverrideModal as a reusable component
  (used by both /status and /broadcast).
- Copy: "Report a problem" -> "Report a Problem" (button + modal title).
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

Hey @ctlaltesc, thanks for submitting this PR! However, it looks like the PR template hasn't been fully filled out.

Issues found:

  • Description section is empty or only contains placeholder text.
  • How Has This Been Tested? section is empty.
  • Checklist section is missing or has been removed.
  • The contribution guidelines checkbox has not been checked.

Please update your PR description to follow the PR template.
Incomplete or missing PR descriptions may indicate insufficient review of the changes, and PRs that do not follow the template may be closed without review.
See our Contributing Guide for more details.

This check will automatically re-run when you edit your PR description.

Adds two checkboxes to the per-user permission editor:

- View Status Page (STATUS_VIEW = 1) — gates the /status page, the
  home-page banner, the sidebar entry, and GET /api/v1/uptimerobot.
- Report a Problem (STATUS_REPORT = 536870912) — child of View Status
  Page; gates the Report-a-Problem button on /status and POST
  /api/v1/uptimerobot/reports.

Both bits are unioned into the default-permissions setting so every new
user has them on by default. A SQLite + Postgres migration ORs both bits
into every existing user.permissions row so accounts created before this
fork's status feature don't lose access.

Both bit values were chosen to fit inside Postgres int4 (the existing
column type for user.permissions): 2^0 was unused upstream and 2^29 was
skipped between MANAGE_BLOCKLIST and VIEW_BLOCKLIST.
@ctlaltesc ctlaltesc merged commit b13dc38 into develop May 2, 2026
10 checks passed

Copy link
Copy Markdown
Owner Author

Closing — the work in this branch was cherry-picked onto main as part of the develop-to-main port (resulting in v1.7.1). All 25 fork-specific commits from develop plus the 6 commits unique to this branch were replayed in chronological order onto a fresh release/v1.7.1 branch off the latest upstream main, then fast-forwarded to main and pushed.

Test status on the ported commits: 111 / 111 passing, server + client typecheck clean, prettier clean.

The develop branch is being retired in favour of main-based releases.


Generated by Claude Code

@ctlaltesc ctlaltesc deleted the claude/add-push-notifications-xeHBy branch May 2, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants